package cn.tedu._05mvcboot04.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author Justin Parker
 * @author 2024/8/18 18:34
 * @version 1.0
 */
@Data
public class UserArticleDTO {
    @NotBlank(message = "文章标题不能为空")
    @Size(min = 1, max = 20, message = "文章标题长度必须在1-20之间")
    @ApiModelProperty(value = "文章标题", required = true)
    private String title;

    @NotBlank(message = "文章内容不能为空")
    @Size(min =10,max =500,message = "文章内容长度必须在10-500之间")
    @ApiModelProperty(value = "文章内容", required = true)
    private String content;
}
